<!--计算属性-computed-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.min.js"></script>
</head>
<body>
<div id="one">
  currentTime1:{{currentTime1()}}
  <br>
  currentTime2:{{currentTime2}}
  <br>
  message1:{{message1}}
</div>
<script>
  var vm = new Vue({
    el:"#one",
    data:{
      message1:"fff",
    },
    methods:{
      currentTime1:function (){
        return Date.now();
      }
    },
    computed:{
      currentTime2:function () {
        this.message1;
        return Date.now();
      }
    }
  });
</script>
</body>
</html>